package exercise.jslide.jslide.controller;

import exercise.jslide.jslide.utils.SerializableColor;
import exercise.jslide.jslide.model.shapes.Shape;
import javafx.scene.canvas.GraphicsContext;

public class ShapeController {
    private Shape shape;

    public ShapeController(Shape shape) {
        this.shape = shape;
    }

    public void drawShape(GraphicsContext gc) {
        shape.draw(gc);
    }

    public void setFillColor(SerializableColor color) {
        shape.setFillColor(color);
    }

    public void setStrokeColor(SerializableColor color) {
        shape.setStrokeColor(color);
    }

    public void setStrokeWidth(double width) {
        shape.setStrokeWidth(width);
    }

    public void selectShape(boolean isSelected) {
        shape.setSelected(isSelected);
    }

    public void applyStyle(Shape.ShapeStyle style) {
        shape.applyStyle(style);
    }
}